<script type="text/javascript" src="<?php echo SystemProperties::$app_host_webroot;?>/js/select_date.js"></script>
<FORM id="commentsProfile" method="get" name="commentsProfile" action="<?php echo SystemProperties::$app_host;?>/count/search_product">
<table width="100%" border="0" cellspacing="1"  cellpadding="0" class="navi" style="margin:10px;">
  <tr>
  <td>
<?php 
   	    $time_start = empty($_REQUEST['from'])?'2010-09-01':trim($_REQUEST['from']);
		$time_end = empty($_REQUEST['end'])?date("Y-m-d"):trim($_REQUEST['end']);
	    $start_time = date('Y-m-d',strtotime($time_start));
	    $end_time = date('Y-m-d',strtotime($time_end));
?>
  统计周期起始时间:<input name="from" readonly type="text" value="<?=$start_time?>" size="15" onFocus="CalendarWebControl.show(this,false,this.value);">  
  统计周期结束时间:<input name="end" readonly type="text" value="<?=$end_time?>" size="15" onFocus="CalendarWebControl.show(this,false,this.value);">  
  <br />
  <label class="textbox" >搜索<b>产品名</b>: <INPUT id="q" name="q" value="<?=empty($q)?'':$q?>" /></label><INPUT class="comment_btn_Submit" type="submit" value="查询" /> (计算复杂,请稍等,请不要重复刷新, 展现次数从2010/5/29开始统计,之前无数据)</td>
   <td align="center"></td>
    
  </tr>
</table>
</form>


<?php
$catname = SystemProperties::$catname;

?>
<table border="0" align="center" cellpadding="0" cellspacing="1" class="list">
  <tr>
    <td  align="center">平台<br />是否发布</td>
    <td  align="center">ID</td>
    <td  align="center">分类</td>
    <td  align="center">图片</td>
    <td  align="center">名称<br />活动周期<br />(每期送出一个)</td>
	<td  align="center">剩余数量</td>
	<td  align="center">周期内展现<br />(即点入产品数)</td>
	<td  align="center">周期内申请</td>
    <td  align="center">周期内申请率</td>
	<td  align="center">总展现</td>
	<td  align="center">总申请</td>
    <td  align="center">申请率</td>
    <td  align="center">修改</td>
    <td  align="center">点击申请详情</td>
  </tr>
  <?php if (!empty($data))foreach ($data as $type=>$da) { ?>
  
<?php foreach($da as $k=>$v){ 
    $profiles['g_products'] = $v['info'];
    ?>
  <tr>    
    <td><?php echo $type?><br />
    <?php if($profiles['g_products']['in_list']==1){?>
    	<strong><span style="background-color:green;color:white">&nbsp;&nbsp;&nbsp;已发布&nbsp;&nbsp;&nbsp;</span></strong><br /><br />
    <?php }else{ ?>
    	<strong><span style="color:#888">隐藏中</span></strong><br /><br />
    
    <?php }?>
    </td>
    <td align="center"><?php echo $profiles['g_products']['g_id']?>　</td>
    <td align="center"><?php echo $catname[$profiles['g_products']['g_cat']]?>　</td>
            <td align="center"><img src="http://<?=$type?>.try8.info/tryapp/<?=$type=='renren'?'try_c2':'try'?>/app/webroot/product_img/<?=$profiles['g_products']['g_img']?>" width="80" height="80" /></td>
    <td align="center"><?php echo $profiles['g_products']['g_name']?><br /><br />
    每隔 <span style="color:red"><?php echo intval($profiles['g_products']['g_timesplit']/6)/10?></span> 小时
送 <span style="color:red"><?php echo $profiles['g_products']['num_per_time']?></span>个　</td>

		  <td align="center"><?php echo $profiles['g_products']['g_number']?></td>
		    
		  <td  align="center"><b><?php echo  $v['view']?></b></td>
		    <td  align="center"><b><?php echo $v['click']?></b></td>
    <td align="center"><?=empty($v['view'])?'0':(intval(($v['click']/$v['view'])*1000)/10)?>%<?php //echo $toolTip->truncate($profiles['g_products']['g_description'],8);?></td>
		  
		 
		    <td  align="center"><?php echo $profiles['g_products']['clickcount']?></td>
		    <td  align="center"><?php echo $profiles['g_products']['applycount']?></td>
    <td align="center"><?=intval(($profiles['g_products']['applycount']/$profiles['g_products']['clickcount'])*1000)/10?>%<?php //echo $toolTip->truncate($profiles['g_products']['g_description'],8);?></td>
    
    <td align="center"><a href="http://<?=$type?>.try8.info/tryapp/TryAppManagement/index.php/product/modifyPruduct/0/<?php echo $profiles['g_products']['g_id']?>"  target="_blank">修改</a>&nbsp;&nbsp;</td>
    <td><a href="http://<?=$type?>.try8.info/tryapp/TryAppManagement/index.php/product/showClickLogs/<?=$profiles['g_products']['g_id']?>" target="_blank">点击详情</a></td>
  

    
    </tr>

  <?php }?>
  
  <?php }?>
  </table>
